import 'package:flutter/material.dart';
import 'package:flutterdemo/pages/tab1/maindemo.dart';
import 'package:flutterdemo/pages/tab1/tabbar/tabBarIndexedStackDemo.dart';
import 'package:flutterdemo/pages/tab1/tabbar/tabBarOrdinaryDemo.dart';
import 'package:flutterdemo/pages/tab1/tabbar/tabbarmiddledemo.dart';
import 'package:flutterdemo/pages/tab1/tabbar/tabbarmiddledemo1.dart';
import 'package:flutterdemo/pages/tab1/tabbar/tabbartopdemo.dart';

class TabBarDemo extends StatefulWidget {
  TabBarDemo({Key key}) : super(key: key);

  _TabBarDemoState createState() => _TabBarDemoState();
}

class _TabBarDemoState extends State<TabBarDemo> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('TabBarDemo'),
      ),
      body: ListView(
        children: <Widget>[
          ListTile(
            title: Text('TabBarDemo 顶部'),
            onTap: () {
              Navigator.push(
                context,
                new MaterialPageRoute(
                  builder: (BuildContext context) => TabBarTopDemo(),
                ),
              );
            },
          ),
          ListTile(
            title: Text('TabBarDemo 中部 实现1'),
            onTap: () {
              Navigator.push(
                context,
                new MaterialPageRoute(
                  builder: (BuildContext context) => TabBarMiddelDemo(),
                ),
              );
            },
          ),
          ListTile(
            title: Text('Drawer 顶部导航，tabbar'),
            onTap: () {
              Navigator.push(
                context,
                new MaterialPageRoute(
                  builder: (BuildContext context) => MainDemo(),
                ),
              );
            },
          ),
          ListTile(
            title: Text('TabBarDemo 中部 实现2'),
            onTap: () {
              Navigator.push(
                context,
                new MaterialPageRoute(
                  builder: (BuildContext context) => TabBarMiddelDemo1(),
                ),
              );
            },
          ),
          ListTile(
            title: Text('TabBarDemo IndexedStack'),
            onTap: () {
              Navigator.push(
                context,
                new MaterialPageRoute(
                  builder: (BuildContext context) => TabBarIndexedStackDemo(),
                ),
              );
            },
          ),
          ListTile(
            title: Text('TabBarDemo ordinary'),
            onTap: () {
              Navigator.push(
                context,
                new MaterialPageRoute(
                  builder: (BuildContext context) => TabBaroOrdinaryDemo(),
                ),
              );
            },
          ),
        ],
      ),
    );
  }
}
